load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "distribution",
    srcs = ["distribution.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/opt/distribution",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/sql/opt",
        "//pkg/sql/opt/memo",
        "//pkg/sql/opt/props/physical",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/util/buildutil",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "distribution_test",
    srcs = ["distribution_test.go"],
    embed = [":distribution"],
    deps = [
        "//pkg/settings/cluster",
        "//pkg/sql/opt/memo",
        "//pkg/sql/opt/norm",
        "//pkg/sql/opt/props",
        "//pkg/sql/opt/props/physical",
        "//pkg/sql/opt/testutils/testcat",
        "//pkg/sql/opt/testutils/testexpr",
        "//pkg/sql/sem/eval",
    ],
)
